using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Main : System.Web.UI.MasterPage
{
    #region Constants
    private const string
        LOGOUT_URL = "~/Security/Logout.aspx",
        PAGE_SERVICE_MEMBER_VIEW = "~/ServiceMemberManagement/ServiceMemberView.aspx";
    #endregion

    #region Event Handlers
    protected void Page_Load( object sender, EventArgs e )
    {
        this.lblHeader.Text = this.Page.Title;
        UserVariable userVariable = new UserVariable();
        if (userVariable != null && userVariable.User == null) Response.Redirect("~/Security/LoginView.aspx");
        this.lblUserName.Text = userVariable.User.CanonicalName;
        this.imgLogo.ToolTip = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
    }
    protected void lnkLogout_Click( object sender, EventArgs e )
    {
        this.Server.Transfer( LOGOUT_URL );
    }
    #endregion

    #region Methods
    public void HideAllToolbarActions()
    {
        this.HideAddGrantAction();
        this.HideGrantListAction();
        this.HideRemindersAction();
        this.HideServiceMembersAction();
    }
    public void HideGrantListAction()
    {
        this.btnGrantList.Visible = false;
    }
    public void HideAddGrantAction()
    {
        this.btnAddGrant.Visible = false;
    }
    public void HideServiceMembersAction()
    {
        this.btnServiceMembers.Visible = false;
    }
    public void HideRemindersAction()
    {
        this.btnReminders.Visible = false;
    }
    #endregion

    #region Properties
    public AjaxControlToolkit.ToolkitScriptManager ScriptManager
    {
        get
        {
            return this.ToolkitScriptManager1;
        }
    }
    #endregion

    #region Private Methods
    #endregion

    #region Private Properties
    #endregion

    #region Construction and Finalization
    #endregion

    #region Data Elements
    #endregion
}